<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>条件渲染</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
    <div id="root">
          <h2>当前的n的值是:{{n}}</h2>
          <button @click="n++">点我n+1</button>
          <template v-if="n===1">
                <h2>你好</h2>
                <h2>尚硅谷</h2>
                <h2>北京</h2>
          </template>
    </div>
</body>
      <script type="text/javascript">
        Vue.config.productionTip = false //阻止 vue 在启动时生成生产提示。

          const vm = new Vue({
            el:'#root',
            data:{
                name:'尚硅谷',
                n:0
            }
          })

      </script>
</html>